"use strict";
var User_1 = require('../../models/User');
var UserUpdateDto = (function () {
    function UserUpdateDto() {
    }
    UserUpdateDto.toUser = function (userId, body) {
        var user = new User_1.User();
        user.username = body.username;
        user.nickname = body.nickname;
        user.password = body.password;
        user.avatar = body.avatar;
        user._id = userId;
        user.createdAt = new Date();
        return user;
    };
    return UserUpdateDto;
}());
exports.UserUpdateDto = UserUpdateDto;
